Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rotation to Gaussian beam initialization #4767

Open
wants to merge 23 commits into
base: development
Choose a base branch
from

Conversation

aeriforme
Copy link
Member

@aeriforme aeriforme commented Mar 12, 2024

This adds the option to rotate in space a species initialized as a Gaussian beam.
The rotation is performed around a user-defined axis by a user-defined angle.

@aeriforme aeriforme changed the title [WIP] Add rotation to Gaussian beam initialization Add rotation to Gaussian beam initialization Apr 17, 2024
@aeriforme aeriforme requested a review from RemiLehe April 17, 2024 20:33
@aeriforme aeriforme added the component: initialization Changes related to the initialization of the simulation label Apr 17, 2024
@RemiLehe RemiLehe closed this May 1, 2024
@RemiLehe RemiLehe reopened this May 1, 2024
@@ -951,6 +951,17 @@ Particle initialization

\sigma_{x,y}(z) &= \sigma^*_{x,y} \sqrt{1 + \left( \frac{z - z^*}{\beta^*_{x,y}} \right)^2}

* ``<species_name>.do_rotation`` (`bool`, optional) the beam is rotated around its centroid.
Copy link
Member

@RemiLehe RemiLehe Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we change the user-input name, to make it clear that this argument is specific to the "gaussian_beam" initialization?

Suggested change
* ``<species_name>.do_rotation`` (`bool`, optional) the beam is rotated around its centroid.
* ``<species_name>.do_gaussian_beam_rotation`` (`bool`, optional) the beam is rotated around its centroid.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the text, could you also add that this can be used e.g. to initialize beams that are crossing at an angle.

@@ -951,6 +951,17 @@ Particle initialization

\sigma_{x,y}(z) &= \sigma^*_{x,y} \sqrt{1 + \left( \frac{z - z^*}{\beta^*_{x,y}} \right)^2}

* ``<species_name>.do_rotation`` (`bool`, optional) the beam is rotated around its centroid.

If ``do_rotation = 1`` then the user needs to specify:
Copy link
Member

@RemiLehe RemiLehe Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If ``do_rotation = 1`` then the user needs to specify:
If ``do_gaussian_beam_rotation = 1`` then the user needs to specify:


If ``do_rotation = 1`` then the user needs to specify:

* ``<species_name>.rotation_axis``: (list of 3 `doubles`) axis around which the rotation takes place
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* ``<species_name>.rotation_axis``: (list of 3 `doubles`) axis around which the rotation takes place
* ``<species_name>.gaussian_beam_rotation_axis``: (list of 3 `doubles`) axis around which the rotation takes place


* ``<species_name>.rotation_axis``: (list of 3 `doubles`) axis around which the rotation takes place

* ``<species_name>.rotation_angle``: (`double`) angle of rotation around the specified axis, in radians.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* ``<species_name>.rotation_angle``: (`double`) angle of rotation around the specified axis, in radians.
* ``<species_name>.gaussian_beam_rotation_angle``: (`double`) angle of rotation around the specified axis, in radians.



Note that the other beam parameters (e.g. ``<species_name>.x/y/z_rms``, etc.) are used in the initialization process `before` performing the rotation.
Therefore, the user should define the beam size, cuts, and focal distance for the beam pre-rotatation, hence aligned to the Cartesian axes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Therefore, the user should define the beam size, cuts, and focal distance for the beam pre-rotatation, hence aligned to the Cartesian axes.
Therefore, the user should define the beam size, cuts, and focal distance for the beam pre-rotation, hence aligned to the Cartesian axes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: initialization Changes related to the initialization of the simulation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants